﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x02000087 RID: 135
	internal class InvalidBytes : IBytesDecoder
	{
		// Token: 0x06000250 RID: 592 RVA: 0x0000B3C2 File Offset: 0x000097C2
		private InvalidBytes()
		{
		}

		// Token: 0x06000251 RID: 593 RVA: 0x0000B3CA File Offset: 0x000097CA
		public byte[] Read(byte[] bytes, int offset, out int readSize)
		{
			throw new InvalidOperationException(string.Format("code is invalid. code:{0} format:{1}", bytes[offset], MessagePackCode.ToFormatName(bytes[offset])));
		}

		// Token: 0x040000AE RID: 174
		internal static readonly IBytesDecoder Instance = new InvalidBytes();
	}
}
